local hx__ziyong = fk.CreateSkill {
  name = "hx__ziyong",
}



hx__ziyong:addEffect("active", {
  name = "hx__ziyong",
  anim_type = "drawcard",
  card_num = 1,
  target_num = 0,
  can_use = function(self, player)
    return player:usedSkillTimes(hx__ziyong.name, Player.HistoryPhase) == 0 and not player:isKongcheng()
  end,
  card_filter = function(self, player, to_select, selected)
    return #selected == 0 and
      not player:prohibitDiscard(Fk:getCardById(to_select))
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    room:throwCard(effect.cards, hx__ziyong.name, player, player)
    if player.dead then return end
    local card = Fk:getCardById(effect.cards[1])
    local x = card.number
    player:drawCards(x, hx__ziyong.name)
  end,
})

return hx__ziyong